<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<s:form method="post" enctype="multipart/form-data"
		action="saveShopSetting" theme="simple">
		<s:hidden name="shopSettings.shopId" />
		<table width="100%">
			<tr>
				<td>
					<div class="blue-text16" style="margin: 0px 0px 0px 0px">
						<s:text name="shopSettings.logo.header" />
					</div>
					<div class="header-separator-bg" style="margin: 10px 5px 0px 0px"></div>
				</td>
			<tr>
				<td>
					<table class="common-text">
						<tr>
							<td align="left" colspan="2">
								<div style="margin: 0px 0px 5px 0px">
									<s:actionerror cssClass="error-text" />
									<s:actionmessage cssClass="error-text" />
									<s:fielderror cssClass="error-text" />
								</div>
							</td>
						</tr>
						<tr>
						<td class="search-text">
							<s:text name="shopSettings.logo.label"></s:text>
						</td>
							<td>
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
			                  <tr>
			                    <td valign="top">
			                    	<div class="fileinputs">
			                    	<s:file name="upload" theme="simple" cssClass="file" onchange="javascript:document.getElementById('Input').value = this.value" />
			                      		<div class="fakefile">
					                        <table border="0" cellpadding="2" cellspacing="0">
					                          <tr>
			                           			 <td>
			                           			 <input name="Input" class="textfield" id="Input"  readonly="readonly"/></td>
			                            		 <td>
			                            			<table width="100%" border="0" cellspacing="0" cellpadding="0">
													  <tr>
													    <td class="btn-grey-left1"></td>
													    <td valign="top" class="btn-grey-middle1">
														   <div style="margin:1px 0px 0px 0px">
														   	<input name="button" type="button" class="submit-btn-common1" value="<s:text name="button.upload" />" />
														   </div>
													    </td>
													    <td valign="top" class="btn-grey-right1"></td>
													  </tr>
													</table>
												</td>
					                          </tr>
					                        </table>
										</div>
									</div>
								</td>
		                  </tr>
		                </table>


							</td>
						</tr>
						<s:if test="shopSettings.logo!=null">
							<tr>
								<td colspan="2">
									<c:set var="count" value="servlet/ImageServlet?dto=ShopSettings&id=" />
									<img class="product-border"
										src="<c:url value="${count}${shopSettings.user.id}"/>" />
								</td>
							</tr>
						</s:if>
						<tr>
							<td class="search-text">
								<s:text name="shopSettings.title.label"></s:text>
							</td>
							<td class="search-text">
								<s:textfield name="shopSettings.title"
									 cssClass="textfield" />
							</td>
						</tr>
						<tr>
							<td class="search-text">
								<s:text name="shopSettings.description.label" ></s:text>
							</td>
							<td class="search-text">
								<s:textarea name="shopSettings.description"
									 cols="50" rows="5" theme="simple"
									cssClass="textfield" />
							</td>
						</tr>
						<tr>
							<td class="search-text">
								<s:text name="shopSettings.currentTemplate.label" ></s:text>
								<s:if test="shopSettings.template.name !=null">
									<s:text name="shopSettings.template.name" />
								</s:if>
							</td>
							<td class="search-text">
								<div style="margin: 8px 0px 0px 0px">
									<table border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td>
												<div style="margin: 0px 8px 0px 0px">
													<table border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td class="btn-grey-left1"></td>
															<td class="btn-grey-middle ">
																<div style="margin: 0px 5px 6px 5px">
																	<a href="changeTemplate.htm" class="btn-grey-link"><s:property
																			value="getText('shopSettings.changeTemplate.label')" />
																	</a>
																</div>
															</td>
															<td class="btn-grey-right1"></td>
														</tr>
													</table>
												</div>
											</td>
											<td>
												<div style="margin: 0px 8px 0px 0px">
													<table border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td class="btn-grey-left1"></td>
															<td class="btn-grey-middle ">
																<div style="margin: 0px 3px 6px 3px">
																	<a href="userShop.htm?userId=<c:url value="${shopSettings.user.userId}"/>" class="btn-grey-link"><s:property
																			value="getText('shopSettings.viewShop.label')" />
																	</a>
																</div>
															</td>
															<td class="btn-grey-right1"></td>
														</tr>
													</table>
												</div>
											</td>
											<td>
												<table border="0" cellspacing="0" cellpadding="0">
													<tr>
															<td class="btn-grey-left1"></td>
														<td class="btn-grey-middle1 ">
															<s:submit value="%{getText('label.template.save')}" theme="simple"
																cssClass="submit-btn-common" />
														</td>
														<td class="btn-grey-right1"></td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</s:form>